ES6 新功能


Posted by Rich on 2021-04-25

let name = rich
console.log(`hello ${name}`)
//output: hello rich
var  obj = {
    a:1,
    b:2
}
var obj2 = {
    ...obj,   ///destructuring
    c: 3
}
var {a, ...rest} = obj2 //rest parameters
console.log(rest)
//output:{b: 2, c: 3}









Related Posts

Beaglebone Black 刷新 EMMC 筆記

Beaglebone Black 刷新 EMMC 筆記

ConQuest計分檔的分割函數

ConQuest計分檔的分割函數

每日心得筆記 2020-07-10(五)

每日心得筆記 2020-07-10(五)


Comments